<% var headContent = { %> <%
include("/template/mtg/includes/header.html"){} %>

<script type="text/javascript" src="${BASE_PATH }template/mtg/person/show_person.js"></script>
<% }; var bodyContent = { %> <%
include("/template/mtg/includes/header_menu.html"){} %>



<div class="container">
	
	<div class="row">
		<div class="col-md-12">	
	
		<div class="panel panel-default">
			 <div class="panel-body" style="padding:0px;">
			<ol class="breadcrumb" style="margin:0px;">
			  <li><a href="${BASE_PATH }home.html">首页</a></li>
			  <li><a href="${BASE_PATH }front/person">我的空间</a></li>
			  <li>编辑信息</li>
			</ol>
			</div>
		</div>
	
		</div>
	</div>
	
	<div class="row">
		<div class="col-md-8">
		
		<div class="panel panel-default">
		  <div class="panel-heading">
			<h3 class="panel-title">个人信息</h3>
		  </div>
		   <div class="panel-body">
		  
				<form class="form-horizontal" name="form1" action="" method="post">
						<input type="hidden" name="model.userid" value="${model.userid}" />
						<div  class="form-group text-center">
							<div class="col-sm-offset-2 col-sm-10">
							<% 
							var userPic = model.title_url;
							if(isEmpty(userPic)){
								userPic = BASE_PATH + 'static/images/user/user.png';
							} else if(!strutil.startWith(userPic , 'http')) {
								userPic = ASE_PATH + userPic;
							}
						 %>
							<img id="title_pic" alt="头像"  width="64" height="64" 
						 			class="img_radius" src="${userPic}">
						 	</div>
						</div>
						
						 <div class="form-group">
						    <label for="username" class="col-sm-2 control-label">登录名</label>
						    <div class="col-sm-10">
						    	${model.username!''}
						    </div>
						  </div>
						  <div class="form-group">
						    <label for="realname" class="col-sm-2 control-label">昵称</label>
						    <div class="col-sm-10">
						      <input name="model.realname" class="form-control" id="realname" 
						      	value="${model.realname!''}" placeholder="昵称">
						    </div>
						  </div>
						  
						  <% if(model.usertype!=4) { %>
								<div class="form-group">
								    <label for="old_password" class="col-sm-2 control-label">原始密码</label>
								    <div class="col-sm-10">
								      <input name="old_password" type="password"class="form-control" id="old_password" placeholder="原始密码">
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="new_password" class="col-sm-2 control-label">新密码</label>
								    <div class="col-sm-10">
								      <input name="new_password" type="password"class="form-control" id="new_password" placeholder="新密码">
								    </div>
								  </div>
								  <div class="form-group">
								    <label for="new_password2" class="col-sm-2 control-label">重复密码</label>
								    <div class="col-sm-10">
								      <input name="new_password2" type="password" class="form-control" id="new_password2" placeholder="重复密码">
								    </div>
								  </div>
							<% } %>
							<div class="form-group">
							    <label for="email" class="col-sm-2 control-label">email</label>
							    <div class="col-sm-10">
							    	<input name="model.email" class="form-control" type="email" id="email" 
							    		value="${model.email!''}"  placeholder="Email">
							    </div>
							  </div>
							<div class="form-group">
							    <label for="tel" class="col-sm-2 control-label">手机号</label>
							    <div class="col-sm-10">
							      <input name="model.tel" type="text" class="form-control" id="tel" 
							      	value="${model.tel!''}" placeholder="手机号">
							    </div>
							  </div>
							  
							  <div class="form-group">
							    <label for="title_url" class="col-sm-2 control-label">头像地址</label>
							    <div class="col-sm-10">
							      <input name="model.title_url" type="text" class="form-control" id="title_url" 
							      	value="${model.title_url!''}" placeholder="头像地址">
							    </div>
							  </div>
							  <div class="form-group">
							    <label for="remark" class="col-sm-2 control-label">备注</label>
							    <div class="col-sm-10">
							    	<textarea rows="3" cols="30" class="form-control" id="remark"
									 name="model.remark" placeholder="备注">${model.remark!''}</textarea>
							    </div>
							  </div>
							 
						  
						  
						   <div class="form-group">
							    <div class="col-sm-offset-2 col-sm-10">
							      <input type="button" value="保 存"  class="btn btn-primary" onclick="oper_save();"/>
										&nbsp;&nbsp;&nbsp;&nbsp;
								  <input type="reset" value="重 置"  class="btn btn-default" />
							    </div>
							</div>
							<div class="form-group">
							    <div class="col-sm-offset-2 col-sm-10">
							      1. 修改基本信息需要输入原始密码。<br>
								  2. 修改密码需要输入原始密码、新密码。
							    </div>
							</div>
						
						</form>
				
				</div>
			</div>
		</div>
		
		<div class="col-md-4">
			<!-- 用户信息 -->
			<%include("/template/mtg/person/userinfo.html"){} %>
		
			<!-- 推荐文章 -->
			<%  include("/template/mtg/includes/recommend.html"){} %>
			
			<!-- 友情链接 -->
		  	<%  include("/template/mtg/includes/friendly.html"){} %>
		</div>
		
	</div>
</div>

						
<%  include("/template/mtg/includes/footer.html"){} %>
	
<a id="scrollTop" href="javacript:void(0);" title="返回顶部" style="display: inline;"></a>
	
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
<%} %>
